home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8654 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  893 b 

  1. Path: airdmhor.gen.nz!not-for-mail
  2. From: gumboot@airdmhor.gen.nz (Simon Hosie)
  3. Newsgroups: comp.arch.arithmetic,comp.lang.c,comp.lang.c++
  4. Subject: Re: Access carry flag from C
  5. Followup-To: comp.arch.arithmetic,comp.lang.c,comp.lang.c++
  6. Date: 26 Feb 1996 10:06:21 +1300
  7. Organization: Airdmhor : a couple of BBS's, a bunch of people, and a cat.
  8. Message-ID: <4gqj0d$d6p@airdmhor.gen.nz>
  9. References: <Dn1C9z.DGv.0.net@indra.com> <ARTHUR.96Feb20143404@gold.Smallworld.co.uk> <824853272snz@genesis.demon.co.uk>
  10. NNTP-Posting-Host: airdmhor.gen.nz
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Lawrence Kirby:
  14. > It certainly can be done portably although not with the efficiency that
  15. > a platform-specific solution is likely to give you.
  16.  
  17. >     int j, k;
  18.  
  19. >     ...
  20.  
  21. >     if ((j >= 0) ? (k > INT_MAX-j) : (k < INT_MIN-j))
  22.                      ^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^
  23.   Won't they both be evaluated?
  24.